package com.winit.base.configModel;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
//@ConfigurationProperties(prefix = "new.project.plan.by.req",locations = "classpath:application.properties")
@ConfigurationProperties(prefix = "new.project.plan.by.req")
@PropertySource("classpath:application.properties")
public class ProjectPlanCodeProjects {
    private Map<String,String> projects;

    public Map<String, String> getProjects() {
        return projects;
    }

    public void setProjects(Map<String, String> projects) {
        this.projects = projects;
    }

    public String getProjectCode(String projectFlag){
        return this.projects.get(projectFlag);
    }
}
